package com.qf.xiaomi.dao;

import com.qf.xiaomi.pojo.CartUnion;

import java.sql.SQLException;
import java.util.List;

/**
 * @Created by 马英超 on 2022/8/18 17:36
 * @author： 马英超
 * @version：v1.0
 * @description:
 */
public interface CartDao {
    //数据处理
    boolean dealCartData(int id,int num,int uid);

    boolean queryCart(int id,int uid) throws SQLException;
    boolean addCart(int id,int num,int uid) throws SQLException;
    boolean updateCart(int id,int num,int uid) throws SQLException;

//查询购物车
    List<CartUnion> queryCartList(String uid);

//按商品、用户删除购物车
    int deleteCart(String cid,String uid);

//清空购物车
    boolean deleteCartByUserId(int uid);
}
